<template>
	<view v-html="content" style="padding: 24rpx;text-align: justify;">
		
	</view>
</template>

<script>
	import {
		config
	} from '@/api/common.js'
	export default {
		data() {
			return {
				type:0,
				content:'',
			}
		},
		onLoad(options) {
			this.type = options.type;
			// 1用户协议 2隐私政策 3提现协议
			uni.setNavigationBarTitle({
				title:this.type==1?'用户协议':this.type==2?'隐私政策':''
			})
			config({
				key: this.type==1?'service_agreement_xia':this.type==2?'privacy_policy':'kq_protocol'
			}).then(res => {
				// console.log(res,'123');
				this.content = res.data[0].value;
			})
		},
		onBackPress() {
			if (uni.getStorageSync('fromStart')) {
				uni.setStorageSync('fromStart',false);
				uni.switchTab({
					url:'/pages/index/index'
				})
				return true;
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
